package entity

import (
	"hobby-mate/common"
	"time"
)

// SessionInformationHistory 会话记录历史
type SessionInformationHistory struct {
	SessionId  string    `json:"sessionId" form:"session_id" gorm:"primary_key;comment:会话记录唯一标识符"`
	ChatRoomId int       `json:"chatRoomId" form:"chat_room_id"  gorm:"not null;comment:聊天房间 ID"`
	SenderId   int       `json:"senderId" form:"sender_id"  gorm:"not null;comment:发送者 ID"`
	ReceiverId int       `json:"receiverId" form:"receiver_id" gorm:"not null;comment:接收者 ID"`
	Message    string    `json:"message" form:"message"  gorm:"not null;comment:消息内容"`
	SentAt     time.Time `json:"sentAt" form:"-" comment:"消息发送时间" gorm:"not null;comment:消息发送时间"`
	common.BaseEntity
}

func (SessionInformationHistory) TableName() string {
	return "t_session_information_history"
}
